<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/1/18
 * Time: 15:40
 */

namespace addons\seller\controller;


use app\common\Code;
use app\common\model\Trade;
use app\common\Session;

class Finance extends Common
{
    /**
     * 商家交易明细
     */
    public function trade_list()
    {
        $this->check_login();
        $seller = Session::get_local_seller();
        if (empty($seller)) {
            response_json(Code::NO_LOGIN, Code::msg(Code::NO_LOGIN));
        }
        $param = input();
        $this->assign("param", $param);
        $param['user_id'] = $seller->user_id;
        $trade_model = new Trade();
        $this->assign("trade", $trade_model);
        $trade_list = Trade::trade_list($param);
        $this->assign("trade_list", $trade_list);
        return $this->fetch();
    }

}